{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
  <div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>
			<a href="{:url('logistics')}">物流列表</a>
		</li>
		<li><strong>修改物流方式</strong></li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('edit_logistics')}">
					<input type="hidden" name="id" value="{$model['id']}" />
					<div class="form-group">
						<label class="col-sm-3 control-label">物流编码：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="no" name="no" value="{$model['value']['no']}" class="form-control" />
							<span class="help-block m-b-none">一般为物流公司拼音组成,不得含有英文以外的字符<a href="http://www.ickd.cn/api/list.html" target="_blank" class="ncap-btn"><i class="fa fa-truck"></i>
                        参考查询编码</a></span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">物流公司名称：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="name" name="name" value="{$model['value']['name']}"  class="form-control" />
							<span class="help-block m-b-none">物流公司名字</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">logo：</label>
						<div class="input-group col-sm-4">
							<input type="hidden" id="thumb" name="thumb" value="{$model['value']['thumb']}" />
							<input id="upload" name="upload" type="file" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 保存</button>&nbsp;&nbsp;
							<a href="{:url('logistics')}" class="btn btn-danger"><i class="fa fa-arrow-left"></i> 返回 </a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
	upload_one('{$model['value']['thumb']}');
	$(function() {
		$("#myForm").validate({
			rules: {
				no: "required",
				name:"required"
			},
			messages: {
				no: ICON.error + "请输入物流编号",
				name:ICON.error + "请输入物流名称"
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}